﻿using UnityEngine;
using System.Collections;
using LuaFramework;

public class ProcUpdate : Proc
{
    public static ProcUpdate Instance;

    public override void onBegin(object[] additionalParams)
    {
        Instance = this;
        AppFacade.Instance.GetManager<LuaManager>(ManagerName.Lua).DestroyLua();
        StartUpdate();
    }

    public override void process()
    {
        
    }

    public override void fixedUpdate()
    {

    }

    public override void onEnd()
    {
        Instance = null;
    }

    public void StartUpdate()
    {
        AppFacade.gameManager.StartCoroutine(DoStartUpdate());

    }

    IEnumerator DoStartUpdate()
    {
        yield return null;
        AppFacade.gameManager.ChangeState("ProcInit");
    }
}